﻿@model IEnumerable<GameSchool.Models.Course>

@{
    ViewBag.Title = "Námskeið";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<p>
    @Html.ActionLink("Create New", "CreateCourse")
</p>
<table>
    <tr>
        <th>
            Námskeið
        </th>
        <th>
            Lýsing
        </th>
        <th>
            Skráningarstaða
        </th>
        <th>
        </th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.CourseName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Description)
        </td>
        <td>
            TODO: icon fyrir<br />
            1. sýnir "done hak"-icon ef notandi er skráður<br />
            2. sýnir "eittvað-action"-icon ef notandi er ekki skráður.<br />
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.CourseId }) |
            @Html.ActionLink("Details", "Details", new { id=item.CourseId }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.CourseId })
        </td>
    </tr>
}

</table>
